home *** CD-ROM | disk | FTP | other *** search
/ PC Electronics Plus 3 / PC Electronics Plus 3.iso / sysan01 / tutor.txt < prev   
Encoding:
Text File  |  1995-12-01  |  24.4 KB  |  505 lines

  1.                     INSTRUCTIONS for the program SYSAN. 
  2.  
  3. SYSAN is a program for the analysis of linear analog and discrete systems
  4. with and without feedback.
  5. The complete and unrestricted rights of the program belong to the author,
  6. M.J. van den Oever, Gregoriusdonk 10, 4707 VA Roosendaal, the Netherlands.
  7. Licensees can, in accordance with the licensing agreement, obtain certain
  8. rights to the program. Violation of the licensing agreement will void this
  9. agreement without any compensation for the licensee. The author reserves the
  10. right for compensation from the licensee in case the licensee circulates the
  11. program or parts thereof without written permission from the author.
  12. The program is not copy protected, but it contains a personal identifica-
  13. tion. This identification is shown in every program output. The identifica-
  14. tion is stored in code in the file IDENT.FIL. The file IDENT.FIL must be in
  15. the same directory as the the program SYSAN.EXE, otherwise SYSAN will not
  16. start.
  17.  
  18. SYSAN was specially developed to run on PC's under the operating system MS-
  19. DOS. The required memory capacity is 640 Kbyte.
  20. A 8087 type numeric coprocessor is recommended. The program will automatic-
  21. ally use the coprocessor if it is available.
  22.  
  23. The program is fully driven via menus and is ment to be used without other
  24. instructions.
  25.  
  26. The program is multilingual. At the moment Dutch, German and English are
  27. available. Via an independant language generator program, other languages can
  28. be made available.
  29. The selection of the default language is fully automatic.
  30. You start the program with SYSAN LANGUAGE, in which LANGUAGE is omitted for
  31. the default language.
  32. The automatic language selection operates by means of the country number
  33. that is given at the startup of the computer in the config.sys file. In
  34. case config.sys does not provide a country number, the default language is
  35. English. You can also create a default language by preparing a file with the
  36. name DEFLANG.TXT and storing this file in the same directory with SYSAN.EXE.
  37. As an example the file DEFLANG.TXT for Dutch is prepared with:
  38.                          copy NEDERL.TXT DEFLANG.TXT
  39. If you do not use the default language, you start SYSAN with
  40.                          SYSAN NEDERLANDS for Dutch
  41.                          SYSAN DEUTSCH for German
  42.                          SYSAN ENGLISH for English.
  43.  
  44. The program delivers tables, mathematical expressions and graphics. All
  45. output parts are complete on one screen. By means of Shift-PrtScr hardcopies
  46. of tables and expressions can be obtained. The special command P yields
  47. hardcopies of the graphics. The options command lets you choose between half
  48. size and full size graphics copies.
  49.  
  50. The program is in color and adjusts itself automatically to the installed
  51. graphics card.
  52. The source program was written in Borland Pascal 7.0. All graphics cards that
  53. can be handled by Borland Pascal 7.0 can also be handled by SYSAN.
  54. It is possible to drive the program by mouse. You therefore should have
  55. installed a mouse with a MicroSoft mousedriver.
  56. The program has an extensive help function. At any place in the program,
  57. except in graphics with activated cursor, you can call the dedicated
  58. helpfunction with function key F1. At the moment the helpfunction is only
  59. available in Dutch and English.
  60. Depending on the particular graphic, the graphic can be provided with a grid
  61. to facilitate reading or a cursor can be installed. The grid facility is
  62. chosen with the options menu. Function key F4 installs the cursor.
  63. Hard copies can be made on Epson compatible 9 pins dot matrix printers and
  64. on HP laserjet and deskjet printers. The hard copy is a screen copy.
  65. Therefore the resolution of the hard copy depends on the graphics card.
  66. There are 2 print sizes: A5 (half size) over the width of the paper and A4
  67. (full size) over the length of the paper. The choice is made in the options
  68. menus.
  69.  
  70. If you wish, you may switch off all the menu directions in the tables,
  71. expressions and graphs. In that case you may also provide the graphics and
  72. the tables with a caption. The output is then more suitable for inclusion in
  73. reports and other publications. This switching is done in the options menu.
  74. Inputs, consisting of only one keystroke (commands), are executed im-
  75. mediately. Inputs, consisting of more keystrokes (data), are to be concluded
  76. with <Enter>.
  77.                              ┌───────────────┐
  78.                              │    D  O  S    │
  79.                              └───────┬───────┘
  80. -------------------------------------│------------------------------------
  81. ┌────────────────────────────────────┴───────────────────────────────────┐
  82. │                                                                        │
  83. │                         M  A  I  N   M  E  N  U                        │
  84. └────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬──────┬────┘
  85. -----│-------│-------│-------│-------│-------│-------│-------│------│-----
  86. ┌────┴─────┐ │ ┌─────┴─────┐ │ ┌─────┴─────┐ │ ┌─────┴─────┐ │ ┌────┴────┐
  87. │          │ │ │           │ │ │           │ │ │  SYSTEM   │ │ │         │
  88. │  INPUT   │ │ │ ROOTLOCI  │ │ │ FEEDBACK  │ │ │   DISPLAY │ │ │   END   │
  89. └────┬─────┘ │ └─────┬─────┘ │ └───────────┘ │ └─────┬─────┘ │ └─────────┘
  90.      │ ┌─────┴─────┐ │ ┌─────┴─────┐   ┌─────┴─────┐ │ ┌─────┴─────┐      
  91.      │ │ TIME      │ │ │FREQUENCY  │   │           │ │ │           │      
  92.      │ │  RESPONSE │ │ │  ANALYSIS │   │  MATRIX   │ │ │  OPTIONS  │      
  93.      │ └─────┬─────┘ │ └─────┬─────┘   └─────┬─────┘ │ └───────────┘      
  94. -----│-------│-------│-------│---------------│-------│--------------------
  95.      │       │       │       │               │       │
  96.      │ ┌─────┴─────┐ │ ┌─────┴─────┐         │ ┌─────┴─────┐
  97.      │ │ GRAPHICS  │ │ │           │         │ │   Save    │
  98.      │ │   OPTIONS │ │ │ GRAPHICS  │         │ │.DFL files │
  99.      │ └───────────┘ │ └─────┬─────┘         │ └───────────┘
  100.      │ ┌───────────┐ │ ┌─────┴─────┐   ┌─────┴─────┐
  101.      │ │ GRAPHICS  ├─┤ │ GRAPHICS  │   │ Save/Call │
  102.      │ │   OPTIONS │ │ │   OPTIONS │   │.STE files │
  103.      │ └───────────┘ │ └───────────┘   └───────────┘
  104. -----│---------------│----------------------------------------------------
  105. ┌────┴─────┐   ┌─────┴─────┐
  106. │  Call    │   │COMPENSATOR│
  107. │.DFL files│   │  DESIGN   │
  108. └──────────┘   └───────────┘
  109.  
  110. The program starts in the main menu. In the maim menu the various parts of
  111. the program may be selected either with the keys for the vertical cursor
  112. movement and the <Enter> key or with with the key for the bold letter or
  113. with the mouse and the left mouse button. In the same manner you make the 
  114. selection in the other menus.
  115.  
  116. With the function key F6, system data may be changed from all program parts.
  117. The changes concern the location of the poles and zeros, the value of the
  118. coefficients of the denominator- and numerator polynomes, the corner
  119. frequencies or the gain. The order of the transfer function cannot be
  120. changed. After the changes via F6 the program returns to the program part
  121. from where the change was initiated but with the new data.
  122.  
  123.  
  124. The function key F8 reinstalls the menu of the subject program part.
  125.  
  126. The function key F9 directly selects the next menu item. Shift-F9 selects
  127. the former menu item.
  128.  
  129. The function key F10 brings you back in the main menu.
  130.  
  131. The system parameters are the common data. The three main parts of the
  132. program: TIMERESPONSE, FREQUENCY ANALYSIS and ROOTLOCI each work indepen-
  133. dently with the system parameters without changing them (except with F6).
  134. Transfer from one main part to another main part always goes via the main
  135. menu.
  136.  
  137. Contents MAIN MENU:
  138.                     System Input
  139.                     Time response
  140.                     Root loci
  141.                     Frequency analysis
  142.                     System Matrix
  143.                     Close control loop
  144.                     Display of system / page overview
  145.                     Options
  146.                               Input K or Kpz ?
  147.                               Coord Cart or pol?
  148.                               Program Instruc. ?
  149.                               Grids in Plots ?
  150.                               Print size ?
  151.                     End of program - return to DOS
  152.  
  153.  
  154. SYSTEM INPUT:
  155. With the SYSTEM INPUT menu you may input the system data from the keyboard
  156. or from the data files. Also the system may be enlarged by adding poles
  157. and/or zeros.
  158.  
  159. Contents SYSTEM INPUT menu:
  160.                     Poles and zeros
  161.                     PoLynomials
  162.                     Corner frequencies
  163.                     Data from File
  164.                     Append system
  165.  
  166. Input of systemdata.
  167.  
  168. The system transfer function can be presented with poles and zeros by
  169.  
  170.             s       s
  171.            (── - 1)(── - 1)....         
  172.             z1      z2                  (s - z1)(s - z2)....
  173. G(s)  =  K ────────────────────  =  Kpz ────────────────────
  174.             s       s                   (s - p1)(s - p2).... 
  175.            (── - 1)(── - 1)....
  176.             p1      p2
  177.  
  178. or by the polynomial form
  179.                   3      2
  180.          ......b3s  + b2s  + b1s + b0
  181. G(s)  =  ────────────────────────────
  182.                   3      2
  183.          ......a3s  + a2s  + a1s + a0
  184.  
  185. In the case of system input with poles and zeros, one has to select in
  186. advance via the options menu whether K or Kpz will be input. The default
  187. selection is K. 
  188. The location of the poles and zeros in the complex plane is normally
  189. input and shown in Cartesian coordinates. Through the options menu one
  190. can opt for polar coordinates.
  191. Besides system inputs by means of poles and zeros or polynomials, system
  192. inputs may also be made through corner frequencies as is customary with Bode
  193. plots. 
  194. Including the driving function, the system can handle a maximum of 8 poles
  195. and 8 zeros. Equal complex poles are not allowed. Up to 4 equal real poles
  196. are permitted.
  197. System data can also be input by means of state equations.
  198. The allowable magnitude of the input poles and zeros depends on the order
  199. of the transfer function. For the calculation of the absolute values of
  200. complex variables one needs the square of the real and the imaginary parts.
  201. Therefore highest power (= the order of the system) of the square of the
  202. complex roots must be smaller than 10 to the power 38. If you use a transfer 
  203. function of the order 8, then the absolute value of poles and zeros must be 
  204. smaller than 10 to the power 38/16 (237). The real and the imaginary part 
  205. must then be smaller than 0.5√2 times this value (167). If you exceed this 
  206. limit, it will result in a runtime error 205.
  207.  
  208. Data from File:
  209.  
  210. With this menu item you may read system data from a disk file. These data
  211. are stored through the save function of the 'Display of system/Data overview'
  212. item of the main program. There is no difference between data read from disk 
  213. and data input through the keyboard. 
  214.  
  215. TIME RESPONSE:
  216. In this part of the program the time response of the system is calculated.
  217. The input signal to the system is defined by its poles, zeros and gainfac-
  218. tor.
  219. In case of an analog system, the Z-transform of the sampled system with 
  220. zero-order hold may be calculated. This Z-transform may be stored on disk 
  221. so that it can be read later to perform further calculations with it.
  222. This Z-transform is correct only when you start with the response on a unit
  223. step.
  224.  
  225. Contents TIME RESPONSE menu:
  226.                     Input signal
  227.                     Laplace - partial fractions
  228.                          or Z-transform - partial fractions
  229.                     Time response - Expression
  230.                     Time response - Table
  231.                     Time response - Plot
  232.                     Plot Options
  233.                               Store plot
  234.                               Fetch plot
  235.                                       Verticals - discrete
  236.                               Change main menu options
  237.                                         Program Instruc. ?
  238.                                         Grids in Plots ?
  239.                                         Print size ?
  240.                     Z-transform (analog systems only)
  241.  
  242.  
  243. ROOT LOCI:
  244. Breakaway points and root-locus points as a function of the gain factor may
  245. be calculated. The gain factor is considered to be a separate proportional
  246. controller with gain Kc. The root-locus plot is drawn by varying Kc from 0
  247. to 10 000. Above 10 000 Kc is considered to be ∞. The original DC system
  248. gain remains unaltered. Of each root locus 100 steps are calculated. It may
  249. occur that certain root loci are not entirely drawn, because either Kc
  250. exceeds 10 000 or the amount of steps is 100.
  251. The graphic display of the root loci can be explored by means of a cursor.
  252. The root-locus plot can be detailed more by reducing the step magnitude
  253. through the options menu. By doing so, there is a fair chance however, that
  254. the complete root-locus plot is not visible anymore as the total number of
  255. steps is limited to 100. The step magnitude should always be smaller than
  256. the smallest distance between any poles and zeros.
  257. The cursor location can be adjusted with the + and - keys of the cursor block
  258. when the cursor is locked onto the root locus. By default the cursor step is
  259. half the step of the root-locus calculation step. The cursor step may be
  260. changed via the options menu. 
  261. A first order lead or lag compensator can be designed with the Compensator
  262. design program. First a dominant pole of the closed loop system, outside the
  263. excisting root locus, is chosen. Thereafter a choice can be made between a
  264. desired zero/pole ratio, a desired DC gain and an optimisation towards a
  265. maximum bandwidth. Further details are available in the accompanying
  266. help text.
  267.  
  268. Contents ROOT LOCI menu:
  269.                     Breakaway points
  270.                     Root locus - Table
  271.                     Root locus - Plot
  272.                     Root locus plot Options
  273.                               Beginning of horizontal scale
  274.                               End of horizontal scale
  275.                               Step magnitude
  276.                               Cursor Adjustment magnitude
  277.                               Negative imaginary part of plot
  278.                               Maximum gain
  279.                               Constant Damping ratio
  280.                               Unit circle (discrete systems)
  281.                               Change main menu options
  282.                                         Program Instruc. ?
  283.                                         Grids in Plots ?
  284.                                         Print size ?
  285.                     Compensator design
  286.                               Zero/pole ratio
  287.                               DC gain
  288.                               Optimise
  289.  
  290.  
  291.  
  292. FREQUENCY ANALYSIS:
  293. In this part of the program the system frequency responses are calculated.
  294. One can automatically determine phase and gain margins.
  295. The 'date line' for the phase is -270°,+90°. This means that angles greater
  296. than +90° are continued beyond -270° and vice versa.
  297. The calculation of phase and gain margins succeeds only with monotonously
  298. climbing or descending functions. If the phase or gain as function of the
  299. frequency does not comply with this rule, the calculation may not converge.
  300. Non convergence will be mentioned.
  301. Bode plots, Nyquist plots and Nichols plots may be drawn. Where applicable,
  302. these plots can be provided with a M and a N circle of specified value.
  303. Approximation of the amplitude plot by straight lines and corner frequencies
  304. can be shown. The phase plot can also be approximated by straight lines. For
  305. single poles or zeros the straight line lies between 0.1*corner-frequency
  306. and 0° and 10*corner-frequency and ±90°. For complex poles or zeros the
  307. straight line approximation runs from
  308.  
  309.      -zèta{1+0.35(1-z²)}                zèta{1+0.35(1-z²)}
  310. wn*10                    and 0° to wn*10                   and 180°.
  311.  
  312. In case further details, of e.g. a Nyquist plot, are to be shown, the lowest
  313. and/or the highest frequency should be adjusted via the Plot Options menu.
  314.  
  315. Contents FREQUENCY ANALYSIS menu:
  316.                     Frequency response Table
  317.                     Single frequency
  318.                     Phase margin
  319.                     Gain at phase Margin
  320.                     Gain margin
  321.                     Bode, Nyquist and Nichols Plot
  322.                               Magnitude-frequency plot (Bode)
  323.                               Phase-frequency plot (Bode)
  324.                               Nyquist plot
  325.                               Nichols Chart
  326.                     Plot Options
  327.                               Lowest frequency - rad/s
  328.                               Highest frequency - rad/s
  329.                               M - Circle
  330.                               N - Circle
  331.                                       Unit circle in polar plot
  332.                               Change main menu options
  333.                                         Program Instruc. ?
  334.                                         Grids in Plots ?
  335.                                         Print size ?
  336.  
  337. For instruction purposes you may start Bode plots (frequency-gain and
  338. frequency-phase shift) with empty coordinates. In this way you can show the
  339. asymptotes first and the real curves afterwards.
  340.  
  341. CLOSE CONTROL LOOP:
  342. When closing the control loop, the system output signal is inverted and fed
  343. back to the input of the system. Part of the gain, poles and zeros can be
  344. relocated from the forward part of the loop to the feedback part of the
  345. loop. By doing so, one can for instance determine the controller output
  346. signal.
  347.  
  348. WARNING:
  349. If the gain choice is K, then relocation of poles or zeros to the feedback
  350. part of the loop means relocation of the terms
  351.           s                    s 
  352.      (1 - ─) respectively (1 - ─).
  353.           p                    z
  354. If the gain choice is Kpz, then the relocated terms are
  355.      (s - p) respectively (s - z).
  356. This influences the static gain of the feedback proces.
  357. When poles and zeros of a discrete system are relocated, the controller
  358. gain and the feedback gain are corrected in such a way that all static gains
  359. of the control loop remain as is.
  360.  
  361. MATRIX:
  362. In this program part system parameters may be input as state variables.
  363. The state equations are shown in the form of matrices. The matrices are
  364. defined for one output and one input of the system. Apart from supplying
  365. system data in the form of state equations, the system data that are already
  366. in the system can be shown as state equations. In that case you have the
  367. choice between the controllable canonical form and the observable canonical
  368. form. 
  369. In the matrix menu you input the state data with function key F3.
  370. New and modified state equations are transferred to the main program and the
  371. system data are stored in the form of poles and zeros and of polynomials.
  372. The state equations of an analog system may be transformed to a sampled
  373. system with a zero order hold. You then obtain the Z-transform of the
  374. sampled system.
  375. The state equations may be saved on disk. To do so you select the menu item
  376. 'System matrices / page overview' and you save the data with F2. When saving,
  377. a filename without extension must be entered. The matrix files automati-
  378. cally obtain the extension .STE. The saved matrix files are called with the
  379. menu item 'State data from file'.
  380.  
  381. Under the menu item 'Pole placement' you calculate the feedback vector K
  382. that causes the selected poles of the feedback system. If you have made this
  383. calculation, the calculations of the menu items 'Observer' and 'Reduced
  384. observer' are extended to the calculation of an observer-controller. To be
  385. able to check the robustness of the feedback system with an observer-
  386. controller the program calculates (if possible) the phase and the gain
  387. margins. Furthermore the data of the open loop system are saved on the 
  388. scratch pad, so that it is always possible to perform a frequency analysis.
  389.  
  390. Contents MATRIX menu:
  391.                     Input system matrices
  392.                     System matrices from File
  393.                     System matrices / Page overview
  394.                               Existing state equations
  395.                               Controllable canonical form
  396.                               Observable canonical form
  397.                               View pages
  398.                     Pole placement
  399.                     Observer
  400.                          Reduced observer
  401.                     Z - transform of matrices  (analog systems only)
  402.  
  403. SYSTEM DISPLAY / PAGE OVERVIEW
  404. In this part of the program all system parameters, both as poles and zeros
  405. and as polynomes are shown. Besides the active data, also past data are
  406. stored and shown. There are 5 pages available for the storage of past data.
  407. Those pages can be shown and made active. Each page has 4 subpages to store
  408. system data in the form of coefficients of state equations. The latter may be
  409. shown under the matrix menu.
  410. With function key F2 you can save system data.
  411. For demonstrations and repeated calculations on the same system it is recom-
  412. mended to prepare the system data in advance and to store those data on
  413. disk. There is no difference between data read from disk and data input
  414. through the keyboard. Data files may be stored in and read from any direc-
  415. tory.
  416. To store or read the data a filename without extension has to be entered.
  417. The files with the transfer functions automatically obtain the extension
  418. .DFL. The matrix files obtain the extension .STE.
  419.  
  420.  
  421. Graphics modes supported by SYSAN.EXE.
  422.  
  423. All graphics modes that are supported by SYSAN.EXE have a horizontal
  424. resolution of either 640 dots or 720 dots.
  425.  
  426. The supported modes are:
  427.      CGA       640 x 200
  428.      MCGA      640 x 200
  429.      MCGA      640 x 480
  430.      EGA       640 x 200
  431.      EGA       640 x 350
  432.      EGA64     640 x 200
  433.      EGA64     640 x 350
  434.      EGAMono   640 x 350
  435.      IBM5814   640 x 480
  436.      HERCMono  720 x 348
  437.      ATT400    640 x 200
  438.      ATT400    640 x 400
  439.      VGA       640 x 200
  440.      VGA       640 x 350
  441.      VGA       640 x 480
  442.      PC3270    720 x 350
  443.  
  444. Only one graphics page is used.
  445.  
  446. It is not possible to automatically select IBM8514 or ATT400. There may also
  447. be problems with automatic detection of some other graphics cards. This
  448. problem occurs e.g. with the Tulip DGA system. Therefore it is possible to
  449. override the automatic selection and to choose a particular graphics driver.
  450. This selection can be made with the program INSTGRAF.EXE, that generates a
  451. file BGI.SEL with a fixed driver selection. The contents of BGI.SEL is just
  452. one line:
  453.   GraphDriver(number)<space>GraphMode(number)<space>GraphDriver(name)
  454. everything in accordance with Borland Pascal code.
  455. If the selected driver in BGI.SEL is not equal to the PC video system, the
  456. program will hang or show unreadable output. BGI.SEL can be deleted with
  457. DOS, thereafter the driver selection is fully automatic again.
  458.  
  459. Monochrome monitors with a grey scale:
  460. In computers with a monochrome monitor and a VGA videocard the text mode
  461. colors presented in grey may give an unreadable result. In this case you can
  462. switch to monochrome with INSTTEXT.
  463.  
  464. Graphics prints:
  465. Graphics hardcopies are normally made with an Epson compatible 9 needles
  466. matrix printer. If you want to make hardcopies with a monochrome HP printer
  467. you need to have an empty file named DESKJET.INS in your working directory.
  468. This file can be made with any text editer.
  469.  
  470.  
  471. Contents of the disk (the demo version has not all these files):
  472.       SYSAN . EXE       IDENT . FIL
  473.         ATT . BGI       STATE . PIC
  474.         CGA . BGI        16X8 . FON
  475.      EGAVGA . BGI       14X9X . FON
  476.     IBM8514 . BGI         4X6 . FON
  477.        HERC . BGI        8X8X . FON
  478.      PC3270 . BGI     ENGLISH . TXT
  479.    NEDERLAN . TXT     DEUTSCH . TXT
  480.  
  481.    DESIGHLP . NED    DESIGHLP . ENG
  482.    FEEDBHLP . NED    FEEDBHLP . ENG
  483.    FREQUHLP . NED    FREQUHLP . ENG
  484.    INPUTHLP . NED    INPUTHLP . ENG
  485.    LOCUSHLP . NED    LOCUSHLP . ENG
  486.     MAINHLP . NED     MAINHLP . ENG
  487.    MATRXHLP . NED    MATRXHLP . ENG
  488.     OPTIHLP . NED     OPTIHLP . ENG
  489.     SYSTHLP . NED     SYSTHLP . ENG
  490.     TIMEHLP . NED     TIMEHLP . ENG
  491.    ZERO1HLP . NED    ZERO1HLP . ENG
  492.    ZERO2HLP . NED    ZERO2HLP . ENG
  493.  
  494.    INSTGRAF . EXE To be used for non-automatic graphics driver selection.
  495.    INSTTEXT . EXE To be used with a monochrome monitor and color video
  496.                   card.
  497.     INSTDIR . EXE Use this when IDENT.FIL is not in the same directory
  498.                   with SYSAN.EXE.
  499.    INSTMAIN . EXE Use this when you start SYSAN.EXE from a different
  500.                   directory.
  501.  
  502.  
  503.  
  504. M.J. van den Oever.                                     October 4 1995        
  505.